#include <iostream>
using namespace std;

#include "binarysearchtree.hpp"

//binary search tree
//左节点小于根节点
//右节点大于跟节点
//作用:快速查找

int main()
{
    int a[] = {8,3,1,10,6,4,7,14,13};
    BSTree<int> b1;
    for(auto e: a)
    {
        b1.insertR(e);
    }
    b1.inorder();

    for(auto e: a)
    {
        b1.eraseR(e);
        b1.inorder();
    }

    return 0;
}

